<style type="text/css">
    .header{
        text-align:center; 
        border-left:1px solid #eaeff0;
        border-top:1px solid #eaeff0;
        border-bottom:1px solid #eaeff0;  
        padding: 8px 0px;
        background-color: #ffffff;
        color: #58666e
    }
    .content_style{
		text-align:center; 
        border-left:1px solid #eaeff0;
        border-bottom:1px solid #eaeff0;
    }
	.padding8_10 {
		padding: 8px 10px;
	}
</style>
<div class="col-sm-12 mt20">

	<div class="panel">
		<div class="panel-body">
			<div class="col-sm-10 control-label" style="font-size: 15px; margin-top: 8px">
			<label class="col-sm-3 control-label">机构名称 : 
				<strong class="ng-binding">{{officeInfo.company_name}}</strong>
			</label>
			<label class="col-sm-3 control-label">机构编号 : 
				<strong class="ng-binding">{{officeInfo.company_code}}</strong>
			</label>
			</div>
			
		</div>
	</div>

	<div class="panel panel-default">
		<div class="panel-body">
			<div class="col-lg-3">
				<input type="text" class="form-control" placeholder="产品名称" ng-model="searchform.name">
			</div>
			<div class="col-lg-3">
				<input type="text" class="form-control" placeholder="产品编号" ng-model="searchform.sale_code">
			</div>
			<!-- <div class="col-lg-2-4">
				<ui-select ng-model="searchform.place_code" theme="bootstrap">
					<ui-select-match placeholder="请选择一个景区">
						{{$select.selected.name}}
					</ui-select-match>
					<ui-select-choices repeat="item.place_code as item in ptp_place_list | filter: $select.search">
						<span ng-bind-html="item.name | highlight: $select.search"></span>
					</ui-select-choices>
				</ui-select>
			</div> -->
			<div class="col-lg-2-4">
				<ui-select ng-model="searchform.sale_category" theme="bootstrap">
					<ui-select-match placeholder="产品分类">
						{{$select.selected.label}}
					</ui-select-match>
					<ui-select-choices repeat="item.value as item in sale_category | filter: $select.search">
						<span ng-bind-html="item.label | highlight: $select.search"></span>
					</ui-select-choices>
				</ui-select>
			</div>
			<div class="col-lg-2-4">
				<ui-select ng-model="searchform.nothave" theme="bootstrap">
					<ui-select-match placeholder="采购分类">
						{{$select.selected.name}}
					</ui-select-match>
					<ui-select-choices repeat="item.value as item in nothave | filter: $select.search">
						<span ng-bind-html="item.name | highlight: $select.search"></span>
					</ui-select-choices>
				</ui-select>
			</div>
			<div class="col-lg-1">
				<button class="btn btn-info " ng-click="search(1)">立即搜索</button>
			</div>
		</div>
		
		<div class="panel-body">
			<div class="col-sm-12">
				<div class="pull-left header" style="width: 50%"><b>产品</b></div>
				<div class="pull-left header" style="width: 15%"><b>产品分类</b></div>
				<div class="pull-left header" style="width: 15%"><b>产品信息</b></div>
				<div class="pull-left header" style="width: 20%; border-right:1px solid #eaeff0;"><b>操作</b></div>     
			</div>

			<h3 class="col-sm-12 text-center" ng-if="loading"><i class="fa fa-spin fa-spinner hide show inline"></i></h3>

			<div class="col-sm-12" ng-repeat="info in sale_list" ng-if="!loading">
				<div class="pull-left content_style padding8_10" style="text-align:left; width: 50%">
					产品名称 : {{info.name}}<br/>产品编号 : {{info.code}}<br/>
					成本价：{{info.cost_price}} 元 / 指导价：{{info.guide_price}} 元 / 市场价：{{info.market_price}} 元
				</div>
				<div class="pull-left content_style padding8_10" style="width: 15%">
					<br/>{{info.sale_category_name}}<br/><br/>
				</div>
				<div class="pull-left content_style padding8_10" style="width: 15%">
					<br/>{{info.state == 1?'已采购':'未采购'}}<br/><br/>
				</div>
				<div class="pull-left content_style padding8_10" style="height: 77px; width: 20%; border-right:1px solid #eaeff0;">
					<button type="button" ng-if="info.state == 0" style="margin-top: 18px" class="btn btn-info btn-xs" 
					ng-click="addToMy(info.code)">添加到产品库</button>
				</div>
			</div>
			<div class="text-right" ng-if="!loading">
				<pagination total-items="totalItems" ng-model="currentPage" ng-change="search(currentPage)" previous-text="上一页"
					next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false"
					items-per-page="itemsPerPage" class="m-b" style="margin-top: 30px">
				</pagination>
			</div>
			
		</div>
	</div>

</div>